/*
 * @Description:调序弹窗
 * @Author: Zzt
 * @Date: 2022-10-31 09:50:31
 * @LastEditTime: 2022-11-01 09:55:48
 */
import { Button, Col, Input, Modal, Row } from 'antd';
import { useMemo, useState } from 'react';

const Reorder = (props: any) => {
  const { selectItems } = props;
  const [reorderVisible, setReorderVisible] = useState(false);
  const showModal = () => {
    setReorderVisible(true);
  };

  const handleOk = () => {
    setReorderVisible(false);
  };

  const handleCancel = () => {
    setReorderVisible(false);
  };
  const onChange = (event: any) => {
    console.log(event.target.value);
  };

  return (
    <>
      <Button onClick={showModal} disabled={selectItems.length !== 1}>
        调序
      </Button>
      <Modal visible={reorderVisible} onOk={handleOk} onCancel={handleCancel} closable={false}>
        <Row>
          <Col span={8}>将此条目序号调整到</Col>
          <Col span={5}>
            <Input onChange={onChange}></Input>
          </Col>
        </Row>
      </Modal>
    </>
  );
};
export default Reorder;
